package com.onepiece.gen.common.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author Administrator
 * Date 2022/12/7 16:00
 * Version 1.0
 * Description TODO
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BusiException extends RuntimeException {

    private String code;
    private String message ;

    public BusiException(BusiExceptionEnum exceptionEnum){
        this.code = exceptionEnum.getCode();
        this.message = exceptionEnum.getMessage();
    }
}
